<?
/**
 * @package timeline-history
 */
(basename($_SERVER['PHP_SELF']) == basename(__FILE__)) && die('Access Denied');

/**
 * Webapp class for audit logging
 */
class Log extends LogDbo {

/**
 * Constructor - add custom log fields
 */
public function __construct() {
	parent::__construct();
	// set property descriptions
	$this->setPropertyDescription('LogApp','App');
	$this->setPropertyDescription('LogDate','Date');
	$this->setPropertyDescription('LogUser','User');
	$this->setPropertyDescription('LogText','Log');
	}

/**
 * Customize information entered into log
 * @return bool
 */
protected function customizeLogEntry() {
	global $_APP;
	if (($_APP->sess instanceof appSession)) {
		$un = $_APP->sess->getUserData('Login');
		if (is_string($un)) {
			$this->setProperty('LogUser',$un);
			}
		}
	return true;
	}

/**
 * Override default writeScreen(), do not want output going to screen
 */
protected function writeScreen() { return true; }

}

?>